package com.meiqiongproperty.yiguanjia.fragment.home.life;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.meiqiongproperty.yiguanjia.R;
import com.meiqiongproperty.yiguanjia.activity.GenericFragmentActivity;
import com.meiqiongproperty.yiguanjia.databinding.LifeMoreLayoutBinding;
import com.meiqiongproperty.yiguanjia.fragment.BaseFragment;

/**
 * author: Administrator
 * date: 2017/7/28.
 * package:com.meiqiongproperty.yiguanjia.fragment.home.life
 */

public class LifeMoreFragment extends BaseFragment {
    LifeMoreLayoutBinding binding;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        binding= DataBindingUtil.inflate(inflater, R.layout.life_more_layout,container,false);
        binding.setOnclick(this);

        binding.navigation.setTitle("更多");
        binding.navigation.setLeftClick(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                sendKeyBackEvent();
            }
        });
        return binding.getRoot();
    }

    /**
     * 私人定制
     * @param view
     */
    public void personalTailorClick(View view){
        Bundle bundle=new Bundle();
        bundle.putString("title","私人定制");
        GenericFragmentActivity.start(getActivity(),HouseKeepServiceFragment.class,bundle);
    }

    /**
     * 家政服务
     * @param view
     */
    public void housekeepClick(View view){
        Bundle bundle=new Bundle();
        bundle.putString("cateId","1");
        bundle.putString("title","家政服务");
        GenericFragmentActivity.start(getActivity(),HouseKeepServiceFragment.class,bundle);
    }

    /**
     * 居家维修
     */
    public void homeMaintainClick(View view){
        Bundle bundle=new Bundle();
        bundle.putString("cateId","2");
        bundle.putString("title","居家维修");
        GenericFragmentActivity.start(getActivity(),HouseKeepServiceFragment.class,bundle);
    }

}
